package com.talangniao.db;

import java.lang.reflect.Method;

import com.talangniao.manager.DaoManager;

import org.springframework.aop.AfterReturningAdvice;

public class AfterConnManager implements AfterReturningAdvice{

    public void afterReturning(Object returnobj, Method method, Object[] params, Object obj) throws Throwable {
        DaoManager dm = (DaoManager)obj;
        dm.getConnection().close();
        System.out.println("[INFO] connection is closed for "+method.getName());
    }

}
